package com.gezi.admin.module.sys.dict.dict;

import com.gezi.admin.utils.AppContextUtil;
import org.springframework.stereotype.Component;

/**
 * @Author 格子代码
 * @createDate 2024/2/10 09:00
 * @contact 1424529270@qq.com
 */
@Component
public class AppDictUtil {

    public static AppDictUtil getInstance() {
        return AppContextUtil.getBean(AppDictUtil.class);
    }

    /**
     * 获取字典数据名称
     * @param dataName
     * @return
     */
    public Object getDictDataName(String dataName){
        if("true".equals(dataName)){
            return true;
        }
        if("false".equals(dataName)){
            return false;
        }

        return dataName;
    }
}
